#ifndef _DragonBall_external_board_
#define _DragonBall_external_board_

#include <cstring>
#include <fstream>
#include "external_board.h"
#include "igslib_iutil.h"
#include "igslib_ipacket.h"
#include "igslib_iserial_manager.h"

#include "mh_mcu.h"

namespace igslib
{

    class DragonBall_externalboard:public mh_mcu
    {
        public:
			DragonBall_externalboard(){}	
            ~DragonBall_externalboard()
            {
                if (pu == nullptr)
                {
                    return;
                }
                delete pu;
                pu = nullptr;
            }
            IProtectUnit* GetProtectUnit() { return pu; }
            void SetSPI(ISpi* value)
            {
                CSerialExternalBoard::SetSPI(value);
                if (pu == nullptr)
                {
                    pu = new ikv();
                }
                pu->SetSPI(value);
                pu->ProtectEnable();
            }
    };


};

#endif
